<?php

namespace app\controller\index;

use app\result\CashflowResult;
use app\result\CategoryResult;
use think\App;

class Cashflow extends BaseIndex
{
    protected $unauthorized = [];

    public function __construct(App $app)
    {
        parent::__construct($app);
        $this->objResult = new CashflowResult();
    }

     public function ready()
    {
        data_exit_json($this->objResult->ready($this->user_id, $this->param));
    }

    public function get($id)
    {
        data_exit_json($this->objResult->get($this->user_id, $id));
    }

    //删除
    public function delete($id)
    {
        data_exit_json($this->objResult->delete($this->user_id, $id));
    }

    public function list()
    {
        data_exit_json($this->objResult->list($this->user_id, $this->param));
    }

    public function list_all()
    {
        data_exit_json($this->objResult->list_all($this->user_id, $this->param));
    }

    public function list_all_search_params()
    {
        data_exit_json($this->objResult->list_all_search_params($this->user_id, $this->param));
    }

    //新增
    public function add()
    {
        data_exit_json($this->objResult->action($this->user_id, $this->param));
    }

    public function update()
    {
        data_exit_json($this->objResult->action($this->user_id, $this->param));
    }

    public function set_display()
    {
        data_exit_json($this->objResult->set_display($this->user_id, $this->param));
    }

    //导出账单
    public function export()
    {
        data_exit_json($this->objResult->export($this->user_id, $this->param));
    }

    //导入账单
    public function import()
    {
        data_exit_json($this->objResult->import($this->user_id, $this->param));
    }

    //导入账单
    public function import_file()
    {
        data_exit_json($this->objResult->import_file($this->user_id, $this->param));
    }

    public function import_tpl()
    {
        data_exit_json($this->objResult->import_tpl());
    }


}
